home *** CD-ROM | disk | FTP | other *** search
- on CheckTextZones
- global mc, mw, ml, gTraceMem, gbTraceLine
- set ReturnVal to 0
- if LazyIsField(mc) then
- set i to the foreColor of word mw of field member mc
- if HotColour(i) then
- set LeftIndex to BuildMouseWordPhrase(i)
- GetColourIndex(LeftIndex)
- set ReturnVal to 1
- DBfingerCursor()
- DeleteTrailingFullStop()
- end if
- if mc = gTraceMem then
- set gbTraceLine to ml
- end if
- end if
- return ReturnVal
- end
-
- on LazyIsField cn
- if cn <= 0 then
- return 0
- exit
- end if
- return the type of member cn = #field
- end
-
- on HotColour C
- return (C mod 255) <> 0
- end
-
- on BuildMouseWordPhrase i
- global mc, mw, gNextArticle
- set left to mw
- set right to mw
- set bCR to 0
- repeat while (the foreColor of word left - 1 of field member mc = i) and (left >= 1) and not bCR
- set left to left - 1
- set bCR to word left to right of field member mc contains RETURN
- end repeat
- if bCR then
- set left to left + 1
- end if
- set bCR to 0
- set wc to the number of words in field member mc
- repeat while (the foreColor of word right + 1 of field member mc = i) and (right <= wc) and not bCR
- set right to right + 1
- set bCR to word left to right of field member mc contains RETURN
- end repeat
- if bCR then
- set right to right - 1
- end if
- set gNextArticle to word left to right of field member mc
- return left
- end
-
- on GetColourIndex LeftIndex
- global mc, gColorList, wColor
- set fg to the foreColor of word LeftIndex of field member mc
- set wColor to getPos(gColorList, fg)
- if wColor = 0 then
- set wColor to 1
- end if
- end
-
- on DeleteTrailingFullStop
- global gNextArticle
- set L to length(gNextArticle)
- if L then
- if char L of gNextArticle = "." then
- delete char L of gNextArticle
- end if
- end if
- set gNextArticle to wordFilter(gNextArticle)
- end
-